<?php
/**
 * Created by PhpStorm.
 * User: zhan
 * Date: 2018/8/22  14:43
 */
namespace app\index\controller;
use think\Controller;
use think\Db;

class Index extends Controller
{
    /*
*	构造函数
*/
    function __construct()
    {
        parent::__construct();
    }
    public function index()
    {
    //   $data = db('app_daikuan')->where($where)->paginate(15, false, $pageParam);

        $data=Db::table('dk_app_index')->where('status=1')->order('sort desc')->limit(0,6)->select();//取出首页
        $data2=Db::table('dk_app_daikuan')->where('status=1')->order('sort desc')->select();
        $banner=Db::table('dk_app_banner')->where('status=1')->order('sort desc')->select();
        //$this->assign('list', $data);
        $this->assign('banner',$banner);
        $this->assign('list', $data);
        $this->assign('list2',$data2);
        $templet='index/index';
       return $this->fetch($templet);
    }
}
